

public class Test {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.print();

        myArrayList.addLast(1);
        myArrayList.addLast(2);
        myArrayList.addLast(3);
        myArrayList.addLast(4);
        myArrayList.print();

        myArrayList.addFirst(999);
        myArrayList.print();

        myArrayList.add(2,88888);
        myArrayList.print();

        System.out.println(myArrayList.contains(3));

        int index = myArrayList.index(3);
        System.out.println(index);

        int data = myArrayList.get(2);
        System.out.println(data);

        myArrayList.set(0,333);
        myArrayList.print();

        myArrayList.remove(333);
        myArrayList.print();
    }
}
